//
//  MIDIcreateCell.m
//  迷笛
//
//  Created by . on 2018/11/19.
//  Copyright © 2018年 🍃🌺🌺🍃. All rights reserved.
//

#import "MIDIcreateCell.h"

@implementation MIDIcreateCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        [self addSubview:self.heardimgea];
        [self.heardimgea mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.mas_offset(WidthScale(40));
            make.width.mas_offset(WidthScale(50));
            make.height.mas_offset(kDevice_Is_iPhoneX?HeighX(50):HeightScale(50));
        }];
        [self addSubview:self.name];
        [self.name mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_offset(WidthScale(15));            make.left.equalTo(self.heardimgea.mas_right).offset(WidthScale(20));
            [self.name setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
        [self addSubview:self.fous];
        [self.fous mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.name.mas_bottom).offset(WidthScale(10));
            make.left.equalTo(self.name);
            [self.fous setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
        [self addSubview:self.post];
        [self.post mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.fous);
            make.left.equalTo(self.fous.mas_right).offset(WidthScale(10));
            [self.post setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
        
        
    }
    return self;
}
-(UIImageView *)heardimgea
{
    if (!_heardimgea)
    {
        _heardimgea =[[UIImageView alloc]init];
        _heardimgea.layer.masksToBounds = YES;
        
        [_heardimgea.layer setCornerRadius:WidthScale(25)]; //设置矩圆角半径
        
    }
    return _heardimgea;
}
-(UILabel *)name
{
    if (!_name)
    {
        _name =[[UILabel alloc]init];
        _name.textColor=[UIColor colorWithHexString:@"#FFFEFE"];
        _name.font =[UIFont systemFontOfSize:WidthScale(15)];
    }
    return _name;
}
-(UILabel *)fous
{
    if (!_fous)
    {
        _fous =[[UILabel alloc]init];
        _fous.textColor=[UIColor colorWithHexString:@"#FFFEFE"];
        _fous.font =[UIFont systemFontOfSize:WidthScale(12)];
    }
    return _fous;
}
-(UILabel *)post
{
    if (!_post)
    {
        _post =[[UILabel alloc]init];
        _post.textColor=[UIColor colorWithHexString:@"#FFFEFE"];
        _post.font =[UIFont systemFontOfSize:WidthScale(12)];
    }
    return _post;
}

@end
